1. Field of the Invention
The present invention relates to a controller for controlling a machine, such as a general machine tool, a laser beam machine, and a plasma jet machine, in which axes thereof are driven by servomotors. More particularly, the present invention relates to a technology for enhancing machining accuracy and machining speed of a machine controlled by the controller.
2. Description of Related Art
On various types of machines such as laser beam machines and plasma jet machines, various kinds of machining tool (for example, cutting tools, drilling tools, laser beam tools, and plasma torches) are mounted on their machining heads, and axes for moving the machining head or a work table relatively to each other are driven by servomotors.
The control of the servomotor for each axis is carried out by a servo control section (including a servo CPU, a servo amplifier, etc.) provided for each axis. The servo control section controls the servomotor based on a motion command outputted to each axis from a controller of a motor machine and a position feedback signal and a speed feedback signal from a pulse encoder provided on the servomotor or a driving shaft.
The controller reads a program defining a motion path of the machining tool, performs an interpolation process and determines a number of interpolation points along the motion path by software processing. Also, an acceleration/deceleration process is carried out so that a motion command for specifying a smooth velocity change with an acceleration (positive or negative, the same in the following description) of a predetermined limit is outputted to the servo control section.
The acceleration/deceleration process is often carried out such that the acceleration/deceleration is effected on each axis based on the data after the interpolation process. However, in such acceleration/deceleration after interpolation, a path error may occur because of a lag of the acceleration/deceleration. Therefore, so as to prevent the occurrence of path error due to the lag of the acceleration/deceleration, an acceleration/deceleration before interpolation in which acceleration/deceleration process is performed prior to the interpolation process may be adopted.
The acceleration in the acceleration/deceleration before interpolation means an acceleration along a direction of motion (tangential direction of the motion path) in the space. However, in the acceleration/deceleration before interpolation which has been conventionally adopted, an allowable acceleration actually specified in the acceleration/deceleration process is set to be constant, irrespective of the motion direction (tangential direction of the motion path) in the space. Therefore, with respect to a machine having a plurality of axes whose acceleration/deceleration characteristics are greatly different from one another, it is necessary to select an acceleration (tangential acceleration) matching the axis having the lowest allowable acceleration. As a result, in the actual motion, there is a possibility that the acceleration/deceleration is effected while leaving acceleration margin for each axis, so that there arises a problem that the time taken for the acceleration/deceleration unnecessarily increases.
Also, with respect to a machine in which allowable accelerations of all axes can be regarded as equal, the tangential acceleration can be made higher than the allowable acceleration of each axis by the simultaneous interpolation of the plurality of axes. In this case, however, the tendency of increasing the time taken for the acceleration/deceleration remains because a constant acceleration is specified.
To solve the above problem, Japanese Patent Laid-Open Publication No. 3-78006 has proposed a method in which an optimal tangential acceleration is determined from the allowable acceleration of each axis and the motion amount for each axis contained in block information of the program. However, this method is effective for a motion by a linear interpolation such that acceleration/deceleration completes in one block, but it can not be applied to a case in which a direction of the motion changes momently, such as a circular interpolation.
For a procedure of the interpolation and the acceleration/deceleration, a method (two-stage interpolation) has been proposed in which the interpolation is divided into a first interpolation (former stage) and a second interpolation (latter stage), and the acceleration process is executed in the second interpolation of latter stage. Of the methods of the two-stage interpolation, the method proposed by the inventors (see Japanese Patent Application No. 9-329744) is especially advantageous in keeping a high path accuracy because smoothness is secured in the second interpolation.
However, even in the technology proposed in Japanese Patent Application No. 9-329744, the acceleration for the acceleration/deceleration control can not be optimized in accordance with the motion direction at every moment. However, as described later, the technology proposed in Japanese Patent Application No. 9-329744 is a basic technology of the present invention.
An object of the present invention is to provide a controller for a machine such as a general machine tool, a laser beam machine and a plasma jet machine, which is capable of performing an acceleration/deceleration control in which an optimal tangential acceleration is applied within an allowable maximum acceleration set for each axis in acceleration/deceleration, while fully taking advantage of the acceleration capacity of each axis. Further object of the present invention is to enable such acceleration/deceleration control to be applied to a case where a direction of motion changes at every moment.
From another point of view, still another object of the present invention is to enable an acceleration in the acceleration/deceleration control to be optimized under the condition of the motion direction at every moment by improving the technology proposed by the inventors in Japanese Patent Application No. 9-329744.
In the present invention, an improvement is made on the controller for a machine (proposed in Japanese Patent Application No. 9-329744) which performs a two-stage interpolation for securing smoothness in path segments in a second interpolation, a motion direction (tangential direction in the space) is determined from data outputted by a first interpolation process, an optimal tangential acceleration, which does not exceed the allowable maximum acceleration set for each axis in acceleration/deceleration, is calculated based on the motion direction, and a tangential acceleration/deceleration process is performed in the second interpolation based on the determined optimal tangential acceleration.
So as to control a machine having axes driven by servomotors, the present invention is applicable to a controller for a machine having means for performing interpolation process on a motion path of a tool commanded by a program through two stages of a first interpolation and a second interpolation based on an output of the first interpolation.
According to the present invention, the optimal tangential acceleration is calculated based on an allowable maximum acceleration set for each axis in acceleration/deceleration and a motion direction of a tool determined based on segment data included in output data of first interpolation means, and a tangential acceleration/deceleration is effected based on the optimal tangential acceleration.
In the preferred embodiment, the controller comprises a target velocity calculating means for determining a target velocity at an end point of each segment based on data outputted from the first interpolating means and stored in an intermediate memory, and the acceleration/deceleration control means performs acceleration/deceleration control based on the target velocity.
Also, in a typical embodiment, the target velocity calculating means repeatedly executes the following processes (a) through (d) until it is determined in the process (d) that the motion segment ixe2x88x921 is subjected to the second interpolation:
(a) assigning an index i to indicate a newest motion segment outputted from the first interpolation means and setting a velocity at an end point of the motion segment i to zero;
(b) calculating a velocity at a start point of the motion segment i so as to reach the velocity at an end point of the motion segment i based on the optimal tangential acceleration calculated by the acceleration calculating means;
(c) setting the velocity at the start point as a velocity of an end point of a motion segment ixe2x88x921 which is immediately before the motion segment i; and
(d) determining whether or not the motion segment ixe2x88x921 is subjected to the second interpolation and decreasing the index i by one to proceed to the process (b) if it is determined that the motion segment ixe2x88x921 is subjected to the second interpolation.
The velocity at a start point calculated at the process (b) may be adjusted to be reduced in compliance with conditions such as corner deceleration and commanded speed.
In the present invention, the data outputted from the first interpolating means includes data (hereinafter, referred simply to as xe2x80x9csegmentxe2x80x9d) representing a motion amount of one interpolation period for each axis. This can be regarded as a state equivalent to a state in which minute straight blocks corresponding to these segments are commanded continuously. Therefore, all interpolations such as circular interpolation and linear interpolation can be handled in the same way. Specifically, even when the motion direction changes continuously, such as in the circular interpolation, the optimal acceleration is calculated for each segment included in the data outputted from the first interpolating means, thereby the tangential acceleration can be changed continuously.